/**
 * 测试接口的多继承
 */


package Interface;

public class TestMultipleInheritance {
    public static void main(String[] args) {
        DImpl d = new DImpl();
        d.testA();
        d.testB();
        d.testC();
    }
}

interface A {
    void testA();
}

interface B {
    void testB();
}

interface C{
    void testC();
}

interface D extends A,B,C{
    void testC(); 
}

class DImpl implements D{       // 实现接口D,接口D继承了A,B,C,所以需要实现A,B,C的所有方法
    @Override
    public void testA() {
        System.out.println("testA");
    }

    @Override
    public void testB() {
        System.out.println("testB");
    }

    @Override
    public void testC() {
        System.out.println("testC");
    }

}